/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : SQL Server
 Source Server Version : 10504000
 Source Host           : localhost:1433
 Source Catalog        : AgingTest
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 10504000
 File Encoding         : 65001

 Date: 23/07/2020 11:24:17
*/


-- ----------------------------
-- Table structure for t_d_ExteCharacter
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[t_d_ExteCharacter]') AND type IN ('U'))
	DROP TABLE [dbo].[t_d_ExteCharacter]
GO

CREATE TABLE [dbo].[t_d_ExteCharacter] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [MotorId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TimeStamp] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [eleStandardSpeed] int  NULL,
  [SetTorque] int  NULL,
  [GetTorque] int  NULL,
  [eleCurrent] int  NULL,
  [Temperature] int  NULL,
  [ErrCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[t_d_ExteCharacter] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for t_d_GetEleZero
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[t_d_GetEleZero]') AND type IN ('U'))
	DROP TABLE [dbo].[t_d_GetEleZero]
GO

CREATE TABLE [dbo].[t_d_GetEleZero] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [MotorId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TimeStamp] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ErrCode] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestName] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[t_d_GetEleZero] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for t_d_PointMoveTest
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[t_d_PointMoveTest]') AND type IN ('U'))
	DROP TABLE [dbo].[t_d_PointMoveTest]
GO

CREATE TABLE [dbo].[t_d_PointMoveTest] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [MotorId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TimeStamp] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [SetSpeed] int  NULL,
  [GetSpeed] int  NULL,
  [eleCurrent] int  NULL,
  [ErrCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[t_d_PointMoveTest] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for t_d_PosAccuracy
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[t_d_PosAccuracy]') AND type IN ('U'))
	DROP TABLE [dbo].[t_d_PosAccuracy]
GO

CREATE TABLE [dbo].[t_d_PosAccuracy] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [MotorId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TimeStamp] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [PosSetPos] int  NULL,
  [PosGetPos] int  NULL,
  [NegSetPos] int  NULL,
  [NegGetPos] int  NULL,
  [ErrCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[t_d_PosAccuracy] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for t_d_PowerONCheck
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[t_d_PowerONCheck]') AND type IN ('U'))
	DROP TABLE [dbo].[t_d_PowerONCheck]
GO

CREATE TABLE [dbo].[t_d_PowerONCheck] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [MotorId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TimeStamp] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [eleCurrent] int  NULL,
  [ErrCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[t_d_PowerONCheck] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for t_d_Precondition
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[t_d_Precondition]') AND type IN ('U'))
	DROP TABLE [dbo].[t_d_Precondition]
GO

CREATE TABLE [dbo].[t_d_Precondition] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [MotorId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TimeStamp] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [GetSpeed] int  NULL,
  [eleCurrent] int  NULL,
  [ErrCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [SetSpeed] int  NULL,
  [Temperature] int  NULL
)
GO

ALTER TABLE [dbo].[t_d_Precondition] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for t_d_SpecCond
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[t_d_SpecCond]') AND type IN ('U'))
	DROP TABLE [dbo].[t_d_SpecCond]
GO

CREATE TABLE [dbo].[t_d_SpecCond] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [MotorId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ErrCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[t_d_SpecCond] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for t_d_SpeedAccuracy
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[t_d_SpeedAccuracy]') AND type IN ('U'))
	DROP TABLE [dbo].[t_d_SpeedAccuracy]
GO

CREATE TABLE [dbo].[t_d_SpeedAccuracy] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [MotorId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TimeStamp] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [SetSpeed] int  NULL,
  [GetSpeed] int  NULL,
  [eleTorque] int  NULL,
  [eleCurrent] int  NULL,
  [ErrCode] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestName] varchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[t_d_SpeedAccuracy] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Table structure for t_d_TestMain
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[t_d_TestMain]') AND type IN ('U'))
	DROP TABLE [dbo].[t_d_TestMain]
GO

CREATE TABLE [dbo].[t_d_TestMain] (
  [TestName] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ErrCode] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [ErrorInfo] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [Id] int  IDENTITY(1,1) NOT NULL,
  [TestId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL,
  [TestTime] datetime  NULL,
  [result] int  NULL,
  [MotorId] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NULL
)
GO

ALTER TABLE [dbo].[t_d_TestMain] SET (LOCK_ESCALATION = TABLE)
GO

